"use strict";
// 定义一个枚举类型的集合
var Color;
(function (Color) {
    Color[Color["red"] = 1] = "red";
    Color[Color["blue"] = 2] = "blue";
    Color[Color["blank"] = 3] = "blank";
})(Color || (Color = {}));
// 访问集合中的类型
console.log(Color.blue, Color[2], Color[Color.blue]);
// 取日期中的星期
var w = (new Date()).getDay(); //0,1,2
// 定义一个代表星期的枚举类型集合
var Week;
(function (Week) {
    Week[Week["\u661F\u671F\u5929"] = 0] = "\u661F\u671F\u5929";
    Week[Week["\u661F\u671F\u516D"] = 1] = "\u661F\u671F\u516D";
    Week[Week["\u661F\u671F\u4E94"] = 2] = "\u661F\u671F\u4E94";
    Week[Week["\u661F\u671F\u56DB"] = 3] = "\u661F\u671F\u56DB";
})(Week || (Week = {}));
// 将获取的数字转成文字
switch (w) {
    case Week.星期天:
        console.log(Week[Week.星期天]);
        break;
    case Week.星期六:
        console.log(Week[Week.星期六]);
        break;
    default:
        break;
}
